package xin.nick.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Nick
 * @since 2023/1/3
 */
@Data
@Component
@ConfigurationProperties(prefix = "system")
public class SystemProperties {

    private Long rootId = 1L;

    private Integer defaultAgentId = 1000001;

    private String localFileSavePath = "/var/file/";

    private String fileRequestPath = "/api/files";

    private String projectUrl = "http://127.0.0.1:9420";

    private String defaultPassword = "123456";

    private String jwtSecret = "CauseImaFoxAndILikeYou1314123456789";

    private String aesSecret = "CauseFoxILikeYou";

    /**
     * 放行白名单配置，不校验此处的白名单
     */
    private List<String> whites = new ArrayList<>();

    /**
     * 需要校验的路径
     */
    private List<String> auths = new ArrayList<>();

}
